﻿<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	request.setAttribute("path", path);
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
 
    <link rel="stylesheet" type="text/css" href="${path}/css/style.css">
	<link rel="stylesheet" type="text/css" href="${path}/css/common.css">
    <script src="${path}/js/jquery.1.11.1.js"></script>
	
	<!-- 返回顶部2个JS -->
	<script type="text/javascript" src="${path}/js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="${path}/js/jquery.min.js"></script>
 <script type="text/javascript" src="${path}/layer_mobile/layer.js"></script>

        <title>五天情侣-来一场爱情时间赛</title>
	
<script type="text/javascript">
var _path = '<%=path %>';
var _user = '<%=session.getAttribute("user") %>';
</script>


<script>
var page = 0;
var pagecount = 1;
</script>

</head>
<body>
<!-- 外部大框开始 fl左浮动 fr右浮动 -->
<div class="a of">
	<div class="cc">
		<div class="cc1 fl">
			<a href="javascript:history.go(-1);"><img src="images/icox12.gif" width="17" height="56" border="0" alt=""></a>
		</div>
		列表
	</div>
	
		<div class="l">
	  <div id="laws_list">
		<div class="l1" style="color: #997B66">
			<ul>
			  
				<li><div class="l1_1 fl"><a href="${path}/lovers/qinlw?wid=${wid}"  >查看效果</a></div>
				<div class="l1_2 fr"><a href="${path}/qianshijianlist/edit?wid=${wid}"  style="color: #0000FF;">添加一条</a></div>
				</li>
			</ul>
		</div>
	   </div>
	 
	 
	</div>
	<div class="l">
	  <div id="laws_list">
		<div class="l1" style="color: #997B66">
			<ul>
			  
				<li><div class="l1_1 fl">标题</div>
				<div class="l1_2 fr">时间</div>
				</li>
			</ul>
		</div>
	   </div>
	 
	 
	</div>
	<div class="l">
	  <div id="laws_list">
	  	<c:forEach var="list" items="${list}" >
		<div class="l1">
			<ul>
			  
				<li><a href="${path}/qianshijianlist/edit?wid=${wid}&id=${list.id}"><div class="l1_1 fl">${list.title}</div></a>
				<div class="l1_2 fr">${list.wtime} &nbsp;  &nbsp;   <a href="${path}/qianshijianlist/del?wid=${wid}&id=${list.id}"> 删除 </a></div>
				
				</li>
			</ul>
		</div>
		 </c:forEach>
	   </div>
	
	 
	</div>
	<input type="hidden"  id="uels"  value="http://www.bee-live.cn/tianqinglvm/lovers/qinlw?wid=${wid}"> 
</div>
<!-- 外部大框结束 -->
<script>
var wid='${wid}';
 function pageNext(){
	 pagecount++;
	 page=page +10;
	 list();
 }
 //type 1表示不带，2表示带参数
  function list(){
	 $.ajax({										//name为 字符串类型，columnid为Long类型
		    url: _path + "/qianshijianlist/queryByPage?wid="+wid+"&pageNo="+page,
		    type: "POST",
		    dataType: "json",
		    async: false,
		    success: function(jsonMap) {
		    	var list = jsonMap.dataList;
		        if(list.length>0){
		        	for(var i=0;i<list.length;i++){
		        		var aaa='<div class="l1">';
		        		aaa+='<ul>';
		        		aaa+='<li><a href="'+_path+'/laws/show-'+list[i].id+'.html"><div class="l1_1 fl">'+list[i].title+'</div></a>';
		        		aaa+='<div class="l1_2 fr">'+list[i].wtime+'</div>';
		        		aaa+='</li>';
		        		aaa+='</ul></div>';
		        			
		        		$("#laws_list").append(aaa);
		        		$("#key").val(name);
		        	}
		        	var count=pagecount*10;
		        	if(count>=jsonMap.iTotalDisplayRecords){
		        		$("#oel").html("已全部加载完");
		        		$("#oel").attr("onclick","");
		        	}else{
		        		$("#oel").html("加载更多");
		        		$("#oel").attr("onclick","pageNext()");
		        	}
		        }else{
		        	 $(".laws_list").html("暂无商家");
		        	 $("#oel").html("已全部加载完");
		        }
		    }
		});
	}
 

 
  </script>


	
</body>
</html>
